package com.mhys.hms.service.user.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mhys.hms.entity.Reward;
import com.mhys.hms.mapper.RewardManagerMapper;
import com.mhys.hms.service.user.RewardManagerService;

@Service("rewardManagerService")
public class RewardManagerServiceImpl implements RewardManagerService {

	@Autowired
	private RewardManagerMapper rewardManagerMapper;
	
	@Override
	public List<Reward> queryAllReward() {
		return rewardManagerMapper.queryAllReward();
	}
	
	@Override
	public List<Reward> queryReward() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Integer updateReward(Reward reward) {
		return rewardManagerMapper.updateReward(reward);
	}

	@Override
	public Integer delRewardInfo(String rId) {
		return rewardManagerMapper.delRewardInfo(rId);
	}

	@Override
	public Integer addRewardInfo(Reward reward) {
		return rewardManagerMapper.addRewardInfo(reward);
	}

	@Override
	public List<Reward> queryRewardById(String rId) {
		return rewardManagerMapper.queryRewardById(rId);
	}

	@Override
	public List<Reward> queryRewardPage(int pageSize, int pageNumber, String deptNo, String deptName) {
		int startNum = (pageNumber - 1) * pageSize;
		return rewardManagerMapper.queryRewardPage(pageSize, startNum, deptNo, deptName);
	}

	@Override
	public int queryTotalCount(String deptNo, String deptName) {
		return rewardManagerMapper.queryTotalCount(deptNo, deptName);
	}



}
